import request from '@/utils/request'


export function roleList(info) {
  return request({
    url: '/role/list',
    method: 'get',
    params: info
  })
}


export function delRole(data) {
  return request({
    url: "/role/delete",
    method: "get",
    params: data,
  });
}


export function updateRole(data) {
  return request({
    url: "/role/update",
    method: "post",
    data
  });
}

export function addRole(data) {
  return request({
    url: "/role/add",
    method: "post",
    data
  });
}

// 根据roleId获取角色信息
export function getMenuById(data) {
  return request({
    url: "/role/" + data,
    method: "get",
  });
}